// index.js
Page({
	takePhoto: function () {
		wx.chooseMedia({
			count: 1,
			sizeType: ['original'],
			sourceType: ['camera'],
			mediaType: ['image'],
			camera: ['back'],
			success: function (res) {
				const tempFilePaths = res.tempFilePaths;
				console.log(tempFilePaths);
				// 图像处理
			},
			fail: function (error) {
				console.error(error);
				// 图像处理
			}
		});
	},
	chooseImage: function () {
		wx.chooseMedia({
			count: 1,
			sizeType: ['original'],
			sourceType: ['album'],
			mediaType: ['image'],
			success: function (res) {
				const tempFilePaths = res.tempFilePaths;
				console.log(tempFilePaths);
				// 图像处理
			},
			fail: function (error) {
				console.error(error);
				// 图像处理
			}
		});
	},
	navigateToHandling: function () {
		wx.navigateTo({
			url: '/pages/handling/handling',
			success: function (res) {
				console.log("成功跳转到处理记录页面");
			},
			fail: function (err) {
				console.error("跳转到处理记录页面失败", err);
			}
		});
	},
	onShow() {
		if (typeof this.getTabBar === 'function' && this.getTabBar()) {
			this.getTabBar().setData({
				selected: 0
			})
		}
	}
})